﻿/*----------------------------------------------------------------
// Copyright (C) 2011 上海
// 版权所有。 
//
// 文件名：PersonCardTempVM
// 文件功能描述：人员发卡发临时卡models层
//
// 
// 创建标识：2012-05-15 王冲
//
// 修改标识：
// 修改描述：
//
//
//----------------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;

namespace WaiGaoQiaoWeb.Models
{
    public class PersonCardTempVM
    {
        [Display(Name = "人员姓名")]
        [Required(ErrorMessage = "人员姓名不能为空")]
        /// <summary>
        /// 人员姓名
        /// </summary>
        public string PName
        {
            get;
            set;
        }

        [Display(Name = "人员编号")]
        [Remote("CheckEmpNo", "PersonCard", AdditionalFields = "EmpNo", HttpMethod = "POST", ErrorMessage = "人员编号不能重复!")]
        /// <summary>
        /// 人员编号
        /// </summary>
        public string EmpNo
        {
            get;
            set;
        }

        [Display(Name = "单位名称")]
        /// <summary>
        /// 单位名称
        /// </summary>
        public string deptName
        {
            get;
            set;
        }
        [Remote("CheckDep_ID", "PersonCard", AdditionalFields = "Dep_ID", HttpMethod = "POST", ErrorMessage = "单位名称不能为空!")]
        /// <summary>
        /// 单位ID
        /// </summary>
        public int Dep_ID
        {
            get;
            set;
        }

        [Display(Name = "人员类型")]
        /// <summary>
        /// 人员类型
        /// </summary>
        public string PersonTypeName
        {
            get;
            set;
        }

        [Display(Name = "卡序列号")]
        [Required(ErrorMessage = "卡序列号不能为空")]
        [Remote("CheckCardSerial", "PersonCard", AdditionalFields = "CardSerial", HttpMethod = "POST", ErrorMessage = "已存在此卡序列号")]
        [StringLength(10, ErrorMessage = "卡序列号最多允许输入10个字符")]
        [RegularExpression(@"^[1-9]\d*$", ErrorMessage = "卡序列号必须是大于0的整数")]
        /// <summary>
        /// 卡序列号
        /// </summary>
        public string CardSerial
        {
            get;
            set;
        }

        [Range(0, 10000, ErrorMessage = "押金必须在10000元以内")]
        [Display(Name = "押金")]
        /// <summary>
        /// 押金
        /// </summary>
        public decimal CardOptDeposit
        {
            get;
            set;
        }

        [Range(0, 100000, ErrorMessage = "开户金额必须在100000元以内")]
        [Display(Name = "开户金额")]
        /// <summary>
        /// 开户金额
        /// </summary>
        public decimal Balance
        {
            get;
            set;
        }

        [Display(Name = "有效期始")]
        /// <summary>
        /// 有效期始
        /// </summary>
        public DateTime InureTime
        {
            get;
            set;
        }

        [Display(Name = "有效期止")]
        /// <summary>
        /// 有效期止
        /// </summary>
        public DateTime ExpiredTime
        {
            get;
            set;
        }

        /// <summary>
        /// 操作员
        /// </summary>
        public string OperatorID
        {
            get;
            set;
        }

        public bool blSubsidyCard
        {
            get;
            set;
        }
        /// <summary>
        /// 月补贴金额
        /// </summary>
        public decimal BTMoney
        {
            get;
            set;
        }
        /// <summary>
        /// 月补贴上限
        /// </summary>
        public decimal BTSX
        {
            get;
            set;
        }
    }
}